<% add_decidim_meta_tags(
  title: t("assemblies.index.title", scope: "decidim"),
  resource: current_participatory_space) %>

<%
edit_link(
  decidim_admin_assemblies.assemblies_path,
  :read,
  :assembly_list
)
%>

<%= append_stylesheet_pack_tag "decidim_assemblies", media: "all" %>

<% content_for :aside do %>
  <h1 class="title-decorator"><%= t("decidim.menu.assemblies") %></h1>

  <%= render partial: "decidim/shared/filters", locals: { filter_sections:, skip_to_id: "assemblies-grid" } %>
<% end %>

<%= render layout:"layouts/decidim/shared/layout_two_col" do %>

  <%= participatory_space_floating_help %>

  <% if promoted_assemblies.any? %>
    <section id="highlighted-assemblies" class="layout-main__section layout-main__heading">
      <h2 class="h5 md:h3 decorator"><%= t("assemblies.index.promoted_assemblies", scope: "layouts.decidim") %></h2>
      <% promoted_assemblies.each do |promoted_assembly| %>
        <%= card_for promoted_assembly, highlight: true, size: :g %>
      <% end %>
    </section>
  <% end %>

  <section id="assemblies-grid" class="layout-main__section layout-main__heading">
    <%= render partial: "collection" %>
  </section>
<% end %>
